Add MATLAB-Python bridge documentation and porting instructions#22
Merged
stevevanhooser merged 3 commits intomainfrom Apr 13, 2026
Merged
Add MATLAB-Python bridge documentation and porting instructions#22stevevanhooser merged 3 commits intomainfrom
stevevanhooser merged 3 commits intomainfrom
Conversation
Introduce four bridge YAML files (following NDI-python pattern) that map every DID-matlab source file to its Python counterpart, tracking sync status via matlab_last_sync_hash. Also add PORTING_INSTRUCTIONS.md with drift-check commands, porting conventions, and current sync status. All recent MATLAB changes (binary-mode fixes, fread/fwrite updates) were verified to already be handled correctly by Python's Fileobj.fopen() which appends 'b' to mode strings automatically. https://claude.ai/code/session_015g95pQvxDUnTWxHYmTnreG
DID-matlab moved symmetry tests to tests_symmetry/ in commit b6a3a05, but DID-python's symmetry.yml still referenced DID-matlab/tests. This caused "Unable to find the did.symmetry.makeArtifacts namespace" errors. https://claude.ai/code/session_015g95pQvxDUnTWxHYmTnreG
The symmetry tests depend on did.test.fixture.PathConstantFixture which lives in DID-matlab/tests/. Need both tests/ (for fixtures) and tests_symmetry/ (for symmetry test packages) on the MATLAB path, matching DID-matlab's own test-symmetry.yml workflow. https://claude.ai/code/session_015g95pQvxDUnTWxHYmTnreG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces comprehensive YAML-based bridge documentation that defines the contract between DID-MATLAB and DID-Python implementations, along with detailed porting instructions for keeping the two codebases synchronized.
Key Changes
Four bridge YAML files defining the mapping between MATLAB and Python implementations:
did_matlab_python_bridge.yaml— Core classes (database, document, query, ido, documentservice, binarydoc)did_matlab_python_bridge_implementations.yaml— Implementation classes (sqlitedb, doc2sql, binarydoc_matfid)did_matlab_python_bridge_file.yaml— File I/O classes and utilities (fileobj, readonly_fileobj, binaryTable)did_matlab_python_bridge_util.yaml— Utility functions (databaseSummary, compareDatabaseSummary, graph functions, datastructures)PORTING_INSTRUCTIONS.md — Complete guide for developers on:
Notable Implementation Details
matlab_last_sync_hashto enable drift detection viagit log <hash>..HEADdecision_logfields track synchronization dates and rationale for deviationsout_of_syncflags identify known divergences (e.g., MATLAB's recent websave→ndi.cloud.api.files.getFile change)This documentation enables systematic tracking of MATLAB-Python parity and provides a clear process for maintaining synchronization as both codebases evolve.
https://claude.ai/code/session_015g95pQvxDUnTWxHYmTnreG